{extend name='admin@main'}

{block name="button"}
{if auth("admin/job_type/jobTypeAdd")}
<button data-modal='{:url("jobTypeAdd")}' data-title="添加兼职分类" class='layui-btn layui-btn-sm layui-btn-primary'>添加兼职分类</button>
{/if}
{/block}

{block name="content"}
<div class="think-box-shadow">
    {include file='job_type/index_search'}
    <table class="layui-table margin-top-10" lay-skin="line">
        <thead>
            <tr>
                <th >类型ID</th>
                <th>类型名称</th>
                <th>分类图片</th>
                <th>是否显示</th>
                <th>排序</th>
                <th>添加时间</th>
                <th>操作</th>
            </tr>
        </thead>
        <tbody>
        {foreach $list as $key=>$vo}
        <tr>
            <td>{$vo.id}</td>
            <td>{$vo.name}</td>
            <td><a data-tips-image="{$vo.img|default=''}" class="fa fa-image font-s14 margin-right-5"></a></td>
            <td>{eq name='vo.status' value='0'}<span class="layui-badge">否</span>{else}<span class="layui-badge layui-bg-green">是</span>{/eq}</td>
            <td>{$vo.sort}</td>
            <td>{$vo.created_at|format_datetime}</td>
            <td>
                {if auth("admin/job_type/edit")}
                <a data-title="编辑分类" class="layui-btn layui-btn-sm" data-modal='{:url("edit")}?id={$vo.id}'>编 辑</a>
                {/if}
                {if auth("admin/job_type/forbid")}
                <a class="layui-btn layui-btn-sm layui-btn-warm" data-action="{:url('forbid')}" data-value="id#{$vo.id};status#0">禁 用</a>
                {/if}
                {if auth("admin/job_type/resume")}
                <a class="layui-btn layui-btn-sm layui-btn-normal" data-action="{:url('resume')}" data-value="id#{$vo.id};status#1">启 用</a>
                {/if}
            </td>
        </tr>
        {/foreach}
        
        
        </tbody>
    </table>
    {empty name='list'}<span class="notdata">没有记录哦</span>{else}{$pagehtml|raw|default=''}{/empty}
</div>
{/block}
